package com.lecture.java8.datastructure;

/**
 * @author luyn
 * @version 1.0
 * @description
 * @date 2021/3/23 16:06
 */
public class Demo1 {

    public static void main(String[] args) {
        //demo1(100000);
        System.out.println("---------------------------");
        demo2(100000);
    }

    public static void demo1(int n) {
        for (int i = 0; i < n; i++) {
            System.out.println(i);
        }
    }

    public static void demo2(int n) {
        if (n >= 0) {
            demo2(n - 1);
            System.out.println(n);
        }
    }
}